const proxy = require( 'http-proxy-middleware' )
const backUrl = 'http://localhost:4000'

module.exports = function ( app ) {
    // app.use(proxy(标识，反向代理配置))
 
    app.use(proxy('/banner',{
      target: backUrl,
      changeOrigin: true
    }))

    app.use(proxy('/login/cellphone',{
      target: backUrl,
      changeOrigin: true
    }))

    app.use(proxy('/cellphone/existence/check',{
      target: backUrl,
      changeOrigin: true
    }))
    
    app.use(proxy('/captcha/sent',{
      target: backUrl,
      changeOrigin: true
    }))

    app.use(proxy('/captcha/verify',{
      target: backUrl,
      changeOrigin: true
    }))
 
    app.use(proxy('/register/cellphone',{
      target: backUrl,
      changeOrigin: true
    }))
  }